import request from './request'

// 获取科目列表
export const getsubjectlist = () => {
  return request({
    url: '/getsubjectlist',
    method: 'GET'
  })
}

// export const getadminlist = (params) => {
//   return request({
//     url: '/getadminlist',
//     method: 'GET',
//     params
//   })
// }

// 判断是否存在之前的组卷记录
export const getgrouprecord = (data) => {
  return request({
      url: '/getgrouprecord',
      method: 'POST',
      data
  })
}

// 获取做题题目
export const getexercisequestions = (data) => {
  return request({
      url: '/getexercisequestions',
      method: 'POST',
      data
  })
}

// 新建组卷题目
export const creategroup = (data) => {
  return request({
      url: '/creategroup',
      method: 'POST',
      data
  })
}

// 修改做题记录
export const setrecords = (data) => {
  return request({
      url: '/setrecords',
      method: 'POST',
      data
  })
}

// 获取历史记录
export const gethistorylist = (params) => {
return request({
  url: '/gethistorylist',
  method: 'GET',
  params
})
}

// 提交答案
export const submitanswers = (data) => {
  return request({
      url: '/submitanswers',
      method: 'POST',
      data
  })
}

// 获取成绩页面信息
export const getgrade = (params) => {
return request({
  url: '/getgrade',
  method: 'GET',
  params
})
}

// 获取错题列表
export const getwronglist = (data) => {
return request({
  url: '/getwronglist',
  method: 'POST',
  data
})
}

// 根据问题编号获取问题
export const getquestions = (data) => {
return request({
  url: '/getquestions',
  method: 'POST',
  data
})
}

// 获取错题列表
export const getcollectlist = (data) => {
return request({
  url: '/getcollectlist',
  method: 'POST',
  data
})
}

// 获取收藏题目
export const getcollectquestions = (data) => {
return request({
  url: '/getcollectquestions',
  method: 'POST',
  data
})
}

// 取消收藏
export const delcollectquestions = (data) => {
return request({
  url: '/delcollectquestions',
  method: 'POST',
  data
})
}

// 添加收藏
export const addcollectquestion = (data) => {
return request({
  url: '/addcollectquestion',
  method: 'POST',
  data
})
}

// 获取评论列表
export const getcommentlist = (params) => {
return request({
  url: '/getcommentlist',
  method: 'GET',
  params
})
}

// 添加收藏
export const addcomment = (data) => {
return request({
  url: '/addcomment',
  method: 'POST',
  data
})
}

// 添加问题
export const setquestion = (data) => {
return request({
  url: '/setquestion',
  method: 'POST',
  data
})
}

// 编写题目文档下下载
export const downloadtext = (data) => {
return request({
  url: '/downloadtext',
  method: 'POST',
  data
})
}

// 举报评论
export const setcomment = (data) => {
return request({
  url: '/setcomment',
  method: 'POST',
  data
})
}

// 删除收藏夹
export const delcollectfolder = (data) => {
return request({
  url: '/delcollectfolder',
  method: 'POST',
  data
})
}

// 获取某个科目试卷
export const gettestpaperlist = (params) => {
return request({
  url: '/gettestpaperlist',
  method: 'GET',
  params
})
}

// 获取试卷内容
export const gettestquestions = (data) => {
return request({
  url: '/gettestquestions',
  method: 'POST',
  data
})
}

// 修改试卷做题记录
export const settestrecords = (data) => {
return request({
  url: '/settestrecords',
  method: 'POST',
  data
})
}

// 提交试卷
export const submittestpaper = (data) => {
return request({
  url: '/submittestpaper',
  method: 'POST',
  data
})
}
